package com.cjm.one.webmanager.service.system.impl;

import com.cjm.one.common.result.Result;
import com.cjm.one.system.client.FileClient;
import com.cjm.one.webmanager.service.system.FileService;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Service
public class FileServiceImpl implements FileService {
    @Resource
    private FileClient fileClient;
    @Override
    public Result<String> uploadFile(MultipartFile file,String category) {
        return fileClient.uploadFile(file,category);
    }

    @Override
    public void downloadFile(String objectName, HttpServletResponse response) {
        fileClient.downloadFile(objectName, response);
    }
}
